-- 配方写在这里
-- recipes_filter.lua中查看官方分类

-- 本mod自己的科技靠近指定建筑或者物品解锁
AddPrototyperDef("bboy_piggy_hi", { -- 嗨猪
    icon_atlas = "images/bboy_crafting_menu_icons.xml",
    icon_image = "station_bboy_piggy_hi.tex",
    is_crafting_station = true,
    action_str = "TRADE",
    filter_text = STRINGS.UI.CRAFTING_STATION_FILTERS.BBOY_PIGGY_HI_SHOP,
})

-- 河灯
AddRecipe2(
    "bboy_river_lantern",
    { Ingredient("papyrus", 1), Ingredient("waxpaper", 1), Ingredient("torch", 1) },
    TECH.LOST,
    {
        placer = "bboy_river_lantern_placer", -- 建造预览
        min_spacing = 0,                      -- 放置间隔
        build_mode = "BBOY_WATER",            -- 建造限制
        build_distance = 10,                  -- 建造范围
        testfn = function(pt)
            return TheWorld.Map:IsOceanTileAtPoint(pt.x, 0, pt.z)
        end,
    },
    {
        "LIGHT",      -- 照明分类
        "DECOR",      -- 装饰分类
        "STRUCTURES", -- 建筑分类
        "BBOY",
    }
)

-- 蜡烛
AddRecipe2(
    "bboy_candle_item",
    { Ingredient("beeswax", 3) },
    TECH.LOST,
    {
        numtogive = 5
    },
    {
        "LIGHT", -- 照明分类
        "DECOR", -- 装饰分类
        "BBOY",
    }
)

-- 院墙
AddRecipe2(
    "wall_bboy_courtyard_item",
    { Ingredient("cutstone", 2) },
    TECH.LOST,
    {
        numtogive = 5
    },
    {
        "DECOR",      -- 装饰分类
        "STRUCTURES", -- 建筑分类
        "BBOY",
    }
)

-- 彼岸花墙
AddRecipe2(
    "wall_bboy_nether_blossom_item",
    { Ingredient("wall_bboy_courtyard_item", 5), Ingredient("bboy_nether_petal", 1) },
    TECH.LOST,
    {
        numtogive = 5
    },
    {
        "DECOR",      -- 装饰分类
        "STRUCTURES", -- 建筑分类
        "BBOY",
    }
)

-- 烛灯
AddRecipe2(
    "bboy_candle_lamp",
    { Ingredient("bboy_candle_item", 1), Ingredient("papyrus", 2), Ingredient("boards", 2) },
    TECH.LOST,
    {
        placer = "bboy_candle_lamp_placer", -- 建造预览
        min_spacing = 1,                    -- 放置间隔
    },
    {
        "LIGHT",      -- 照明分类
        "DECOR",      -- 装饰分类
        "STRUCTURES", -- 建筑分类
        "BBOY",
    }
)

-- 枯井
AddRecipe2(
    "bboy_dry_well",
    { Ingredient("boards", 1), Ingredient("rocks", 5), Ingredient("pickaxe", 1) },
    TECH.LOST,
    {
        placer = "bboy_dry_well_placer", -- 建造预览
        min_spacing = 2,                 -- 放置间隔
    },
    {
        "DECOR",      -- 装饰分类
        "STRUCTURES", -- 建筑分类
        "BBOY",
    }
)

-- 孤坟
AddRecipe2(
    "bboy_forsaken_grave",
    { Ingredient("boards", 3), Ingredient("rocks", 5) },
    TECH.LOST,
    {
        placer = "bboy_forsaken_grave_placer", -- 建造预览
        min_spacing = 2,                       -- 放置间隔
    },
    {
        "DECOR",      -- 装饰分类
        "STRUCTURES", -- 建筑分类
        "BBOY",
    }
)

-- 纸牛
AddRecipe2(
    "bboy_paper_beefalo_item",
    { Ingredient("papyrus", 5), Ingredient("nightmarefuel", 1) },
    TECH.LOST,
    {},
    {
        "MAGIC", -- 魔法分类
        "BBOY",
    }
)

-- 纸人
AddRecipe2(
    "bboy_paper_effigy_item",
    { Ingredient("papyrus", 3), Ingredient("nightmarefuel", 1) },
    TECH.LOST,
    {},
    {
        "MAGIC", -- 魔法分类
        "BBOY",
    }
)

-- 招财猫
AddRecipe2(
    "bboy_lucky_cat",
    { Ingredient("marble", 3), Ingredient("goldnugget", 5), Ingredient("boards", 3) },
    TECH.LOST,
    {
        placer = "bboy_lucky_cat_placer",
        min_spacing = 2,
    },
    {
        "DECOR",      -- 装饰分类
        "STRUCTURES", -- 建筑分类
        "BBOY",
    }
)

-- 流浪商人相关
-- 烟花
AddRecipe2("wanderingtradershop_bboy_fireworks",
    { Ingredient("goldnugget", 3) },
    TECH.LOST,
    {
        limitedamount = true,
        nounlock = true,
        actionstr = "WANDERINGTRADERSHOP",
        sg_state = "give",
        product = "bboy_fireworks",
        image = "bboy_fireworks.tex",
    }
)

-- 嗨猪相关
-- 彼岸蛾
AddRecipe2("bboy_piggy_hi_shop_bboy_nether_moth",
    { Ingredient("bboy_copper_coin", 2) },
    TECH.LOST,
    {
        limitedamount = true,
        nounlock = true,
        actionstr = "WANDERINGTRADERSHOP",
        sg_state = "give",
        product = "bboy_nether_moth",
        image = "bboy_nether_moth.tex",
    }
)
-- 招财猫蓝图
AddRecipe2("bboy_lucky_cat_blueprint",
    { Ingredient("goldnugget", 2) },
    TECH.LOST,
    {
        limitedamount = true,
        nounlock = true,
        actionstr = "WANDERINGTRADERSHOP",
        sg_state = "give",
        product = "bboy_lucky_cat_blueprint",
        image = "blueprint_rare.tex",
    }
)
-- 纸人蓝图
AddRecipe2("bboy_piggy_hi_shop_bboy_paper_effigy_item_bboy_zhongyuan_blueprint",
    { Ingredient("bboy_copper_coin", 10) },
    TECH.LOST,
    {
        limitedamount = true,
        nounlock = true,
        actionstr = "WANDERINGTRADERSHOP",
        sg_state = "give",
        product = "bboy_paper_effigy_item_bboy_zhongyuan_blueprint",
        image = "bboy_paper_effigy_item_bboy_zhongyuan_blueprint.tex",
    }
)
-- 纸牛蓝图
AddRecipe2("bboy_piggy_hi_shop_bboy_paper_beefalo_item_bboy_zhongyuan_blueprint",
    { Ingredient("bboy_copper_coin", 10) },
    TECH.LOST,
    {
        limitedamount = true,
        nounlock = true,
        actionstr = "WANDERINGTRADERSHOP",
        sg_state = "give",
        product = "bboy_paper_beefalo_item_bboy_zhongyuan_blueprint",
        image = "bboy_paper_beefalo_item_bboy_zhongyuan_blueprint.tex",
    }
)
-- 孤坟蓝图
AddRecipe2("bboy_piggy_hi_shop_bboy_forsaken_grave_bboy_zhongyuan_blueprint",
    { Ingredient("bboy_copper_coin", 10) },
    TECH.LOST,
    {
        limitedamount = true,
        nounlock = true,
        actionstr = "WANDERINGTRADERSHOP",
        sg_state = "give",
        product = "bboy_forsaken_grave_bboy_zhongyuan_blueprint",
        image = "bboy_forsaken_grave_bboy_zhongyuan_blueprint.tex",
    }
)
-- 枯井蓝图
AddRecipe2("bboy_piggy_hi_shop_bboy_dry_well_bboy_zhongyuan_blueprint",
    { Ingredient("bboy_copper_coin", 10) },
    TECH.LOST,
    {
        limitedamount = true,
        nounlock = true,
        actionstr = "WANDERINGTRADERSHOP",
        sg_state = "give",
        product = "bboy_dry_well_bboy_zhongyuan_blueprint",
        image = "bboy_dry_well_bboy_zhongyuan_blueprint.tex",
    }
)
-- 彼岸花墙蓝图
AddRecipe2("bboy_piggy_hi_shop_wall_bboy_nether_blossom_item_bboy_zhongyuan_blueprint",
    { Ingredient("bboy_copper_coin", 10) },
    TECH.LOST,
    {
        limitedamount = true,
        nounlock = true,
        actionstr = "WANDERINGTRADERSHOP",
        sg_state = "give",
        product = "wall_bboy_nether_blossom_item_bboy_zhongyuan_blueprint",
        image = "wall_bboy_nether_blossom_item_bboy_zhongyuan_blueprint.tex",
    }
)
-- 生活质量指南
AddRecipe2("bboy_piggy_hi_shop_bboy_book_survival_guide",
    { Ingredient("bboy_copper_coin", 25) },
    TECH.LOST,
    {
        limitedamount = true,
        nounlock = true,
        actionstr = "WANDERINGTRADERSHOP",
        sg_state = "give",
        product = "bboy_book_survival_guide",
        image = "bboy_book_survival_guide.tex",
    }
)
-- 木炭交易
AddRecipe2("bboy_piggy_hi_shop_charcoal",
    { Ingredient("bboy_copper_coin", 1) },
    TECH.LOST,
    {
        numtogive = 5,
        limitedamount = true,
        nounlock = true,
        actionstr = "WANDERINGTRADERSHOP",
        sg_state = "give",
        product = "charcoal",
        image = "charcoal.tex",
    }
)
-- 硝石交易
AddRecipe2("bboy_piggy_hi_shop_nitre",
    { Ingredient("bboy_copper_coin", 2) },
    TECH.LOST,
    {
        limitedamount = true,
        nounlock = true,
        actionstr = "WANDERINGTRADERSHOP",
        sg_state = "give",
        product = "nitre",
        image = "nitre.tex",
    }
)
-- 蜂蜡交易
AddRecipe2("bboy_piggy_hi_shop_beeswax",
    { Ingredient("bboy_copper_coin", 3) },
    TECH.LOST,
    {
        limitedamount = true,
        nounlock = true,
        actionstr = "WANDERINGTRADERSHOP",
        sg_state = "give",
        product = "beeswax",
        image = "beeswax.tex",
    }
)
-- 采下的芦苇交易
AddRecipe2("bboy_piggy_hi_shop_cutreeds",
    { Ingredient("bboy_copper_coin", 2) },
    TECH.LOST,
    {
        limitedamount = true,
        nounlock = true,
        actionstr = "WANDERINGTRADERSHOP",
        sg_state = "give",
        product = "cutreeds",
        image = "cutreeds.tex",
    }
)
-- 月岩交易
AddRecipe2("bboy_piggy_hi_shop_moonrocknugget",
    { Ingredient("bboy_copper_coin", 5) },
    TECH.LOST,
    {
        limitedamount = true,
        nounlock = true,
        actionstr = "WANDERINGTRADERSHOP",
        sg_state = "give",
        product = "moonrocknugget",
        image = "moonrocknugget.tex",
    }
)
-- 排箫交易
AddRecipe2("bboy_piggy_hi_shop_panflute",
    { Ingredient("bboy_copper_coin", 25) },
    TECH.LOST,
    {
        limitedamount = true,
        nounlock = true,
        actionstr = "WANDERINGTRADERSHOP",
        sg_state = "give",
        product = "panflute",
        image = "panflute.tex",
    }
)
-- 彩虹宝石交易
AddRecipe2("bboy_piggy_hi_shop_opalpreciousgem",
    { Ingredient("bboy_copper_coin", 40) },
    TECH.LOST,
    {
        limitedamount = true,
        nounlock = true,
        actionstr = "WANDERINGTRADERSHOP",
        sg_state = "give",
        product = "opalpreciousgem",
        image = "opalpreciousgem.tex",
    }
)
-- 熊皮交易
AddRecipe2("bboy_piggy_hi_shop_bearger_fur",
    { Ingredient("bboy_copper_coin", 25) },
    TECH.LOST,
    {
        limitedamount = true,
        nounlock = true,
        actionstr = "WANDERINGTRADERSHOP",
        sg_state = "give",
        product = "bearger_fur",
        image = "bearger_fur.tex",
    }
)
-- 眼球交易
AddRecipe2("bboy_piggy_hi_shop_deerclops_eyeball",
    { Ingredient("bboy_copper_coin", 30) },
    TECH.LOST,
    {
        limitedamount = true,
        nounlock = true,
        actionstr = "WANDERINGTRADERSHOP",
        sg_state = "give",
        product = "deerclops_eyeball",
        image = "deerclops_eyeball.tex",
    }
)
-- 鹅毛交易
AddRecipe2("bboy_piggy_hi_shop_goose_feather",
    { Ingredient("bboy_copper_coin", 15) },
    TECH.LOST,
    {
        limitedamount = true,
        nounlock = true,
        actionstr = "WANDERINGTRADERSHOP",
        sg_state = "give",
        product = "goose_feather",
        image = "goose_feather.tex",
    }
)
-- 砂之石交易
AddRecipe2("bboy_piggy_hi_shop_townportaltalisman",
    { Ingredient("bboy_copper_coin", 10) },
    TECH.LOST,
    {
        limitedamount = true,
        nounlock = true,
        actionstr = "WANDERINGTRADERSHOP",
        sg_state = "give",
        product = "townportaltalisman",
        image = "townportaltalisman.tex",
    }
)
